package com.wyg.blog.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wyg.blog.model.blog.BlogTag;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BlogTagMapper {
    IPage<BlogTag> getBlogTags(Page<?> page);

    List<Integer> getTagIdByBid(Integer bid);

    Integer getBlogCount(Integer tid);

    IPage<Integer> getBlogIdByTid(Page<?> page, Integer tid);

    boolean addBlogTag(List<BlogTag> blogTags);

    boolean deleteBlogTagByBid(Integer bid);

    boolean deleteBlogTagByTid(Integer tid);

    Integer contains(@Param("bid") Integer bid, @Param("tid") Integer tid);

}
